Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flow computation of HVDC connected at only one side #965

Merged
merged 24 commits into from
Jan 30, 2024

Conversation

vidaldid-rte
Copy link
Collaborator

@vidaldid-rte vidaldid-rte commented Jan 23, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?

Yes : #953
This PR fixes the disconnection in situation N and completes #961

What kind of change does this PR introduce?

When one of the LfBus is missing in the LfNetwork, the HVDC status is determined by the IIDM Network.
If that bus is isolated, the HVDC does not flow any active power.
The determination is made before all LfBus are created for LCC stations - and thus contingencies that disconnect or reconnect an HDVC link with LCC station is still NOT SUPPORTED.

What is the current behavior?

Active power flows through an HVDC even if one of the stations is dandling in situation N.

What is the new behavior (if this is a feature change)?
If one of the stations of an HVDC line is dandling in situation N, no active power flows through it.

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

geofjamg and others added 5 commits January 24, 2024 09:47
# Conflicts:
#	src/test/java/com/powsybl/openloadflow/network/HvdcNetworkFactory.java
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Anne Tilloy <[email protected]>
Signed-off-by: Anne Tilloy <[email protected]>
Signed-off-by: VIDAL Didier (Externe) <[email protected]>
Signed-off-by: VIDAL Didier (Externe) <[email protected]>
Base automatically changed from rework-hvdc to main January 25, 2024 09:49
Signed-off-by: VIDAL Didier (Externe) <[email protected]>
@vidaldid-rte vidaldid-rte changed the title [WIP] Support HVDC disconnection in IIDM network Support HVDC disconnection in IIDM network Jan 25, 2024
Signed-off-by: VIDAL Didier (Externe) <[email protected]>
Signed-off-by: VIDAL Didier (Externe) <[email protected]>
vidaldid-rte and others added 2 commits January 26, 2024 11:48
…erator...) and pinpoint limitation with current implementation

Signed-off-by: VIDAL Didier (Externe) <[email protected]>
Signed-off-by: Anne Tilloy <[email protected]>
vidaldid-rte and others added 3 commits January 26, 2024 15:40
…ify test to use network monitors

Signed-off-by: VIDAL Didier (Externe) <[email protected]>
Signed-off-by: VIDAL Didier (Externe) <[email protected]>
Signed-off-by: Anne Tilloy <[email protected]>
Comment on lines 374 to 375
assertTrue(pcs2 == 0 || Double.isNaN(pcs2), "HVDC Station should not generate power " + network.getHvdcConverterStation("cs2").getTerminal().getP());
assertTrue(pcs3 == 0 || Double.isNaN(pcs3), "HVDC Station should not generate power");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: we get 0MW for VSC and NaN for LCC, we might leave like this for now but add a comment/note here because it is not straightforward / it is inconsistent today in OLF

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, and I am not sure it is the good solution to put NaN.

Comment on lines +233 to +238
public static boolean isIsolatedBusForHvdc(LfBus bus, GraphConnectivity<LfBus, LfBranch> connectivity) {
// used only for hvdc lines.
// this criteria can be improved later depending on use case
return connectivity.getConnectedComponent(bus).size() == 1 && bus.getLoadTargetP() == 0.0
&& bus.getGenerators().stream().noneMatch(LfGeneratorImpl.class::isInstance);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no SA test covering this

@jeandemanged
Copy link
Member

I would rename the PR to something like Fix flow computation of HVDC connected at only one side

Signed-off-by: Anne Tilloy <[email protected]>
Signed-off-by: Anne Tilloy <[email protected]>
@@ -285,7 +285,11 @@ void addLoad(Load load, LfNetworkParameters parameters) {
}

void addLccConverterStation(LccConverterStation lccCs, LfNetworkParameters parameters) {
getOrCreateLfLoad(null, parameters).add(lccCs, parameters);
if (!HvdcConverterStations.isHvdcDanglingInIidm(lccCs, parameters)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of that, we end the calculation with NaN as p for the converter station for LCC only. @jeandemanged I don't like it very much...

@annetill annetill changed the title Support HVDC disconnection in IIDM network Fix flow computation of HVDC connected at only one side Jan 29, 2024
Copy link

Copy link
Member

@jeandemanged jeandemanged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is very fine enough for now, thanks

@jeandemanged jeandemanged merged commit ebd343d into main Jan 30, 2024
6 checks passed
@jeandemanged jeandemanged deleted the hvdc-loss-in-N branch January 30, 2024 09:07
@annetill annetill mentioned this pull request Feb 1, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants